1
general::
Be crazy or at least very eccentric, as in Sally thought her aunt's belief in ghosts indicated she had bats in her belfry. This term in effect likens the bat's seemingly erratic flight in the dark to ideas flying around in a person's head. [Early 1900s]
American Heritage Idioms